package org.shanktech.tshare.binlogsync.queue;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

import org.shanktech.tshare.binlogsync.model.binlog.BinlogData;

public class BinlogQueue {

  private static BlockingQueue<BinlogData> binglogMq = new LinkedBlockingDeque<>(50); 
  
  public static void put(BinlogData elment) throws InterruptedException {
    binglogMq.put(elment);
  }
  
  public static BinlogData take() throws InterruptedException {
    return binglogMq.take();
  }

  public static BlockingQueue<BinlogData> getBinglogMq() {
    return binglogMq;
  }

  public static void setBinglogMq(BlockingQueue<BinlogData> binglogMq) {
    BinlogQueue.binglogMq = binglogMq;
  }
}
